package com.boot.controller.auth;

import com.boot.ao.auth.LoginAO;
import com.boot.common.po.Result;
import com.boot.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@Api(value = "登录管理", tags = "登录管理", description = "登录管理--接口规范")
public class LoginController extends BaseController {

    @Resource
    private SysUserService sysUserService;

    @ApiOperation(value = "登录", notes = "登录", tags = "登录管理")
    @PostMapping(value = "/login")
    public Result login(@RequestBody @Valid LoginAO loginAO) {
        return sysUserService.login(loginAO);
    }
}
